<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use common\models\Character;
use common\models\SummitInformation;

/* @var $this yii\web\View */
/* @var $model common\models\Authority */
/* @var $form yii\widgets\ActiveForm */
$data = Character::find()->all();
$view = SummitInformation::find()->all();
?>

<div class="authority-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'character_id')->dropDownList(ArrayHelper::map($data,'id', 'name'));?>

    <?= $form->field($model,'views')->dropDownList(ArrayHelper::map($view,'view', 'name')); ?>


	<?php if (!Yii::$app->request->isAjax){ ?>
	  	<div class="form-group">
	        <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
	    </div>
	<?php } ?>

    <?php ActiveForm::end(); ?>
    
</div>
